home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / routeprint.z / routeprint
Text File  |  1998-10-30  |  11KB  |  265 lines

  1.  
  2.  
  3.  
  4. RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))                   PPPPrrrriiiinnnnttttiiiinnnngggg TTTToooooooollllssss                   RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      routeprint, fileconvert - convert file to printer or to specified
  10.      filetype
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      rrrroooouuuutttteeeepppprrrriiiinnnntttt [----cccc filetypeDatabasePath ] [----gggg]  [ [----pppp printer] | [----dddd
  14.      destination-type] ] [----tttt source-type] files
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _r_o_u_t_e_p_r_i_n_t is a utility  accessible from the IRIX command line to request
  18.      a Bourne Shell command line which will convert the given file to the
  19.      requested format.  _r_o_u_t_e_p_r_i_n_t may also be used to convert files of
  20.      various types to print on one of a set of desired printers. _r_o_u_t_e_p_r_i_n_t
  21.      uses file types specified on the command line to look up print conversion
  22.      rules for each file to be printed. The conversion rules are located in
  23.      compiled ._o_t_r files in /_u_s_r/_l_i_b/_f_i_l_e_t_y_p_e.  The older _f_t_r(_1) database
  24.      format, ._c_t_r files are not supported anymore.  The source ._f_t_r files can
  25.      be found in the _l_o_c_a_l, _i_n_s_t_a_l_l, _s_y_s_t_e_m, and _d_e_f_a_u_l_t subdirectories under
  26.      /_u_s_r/_l_i_b/_f_i_l_e_t_y_p_e.  If no file types are specified on the command line,
  27.      _r_o_u_t_e_p_r_i_n_t looks up the appropriate type for each file.  _r_o_u_t_e_p_r_i_n_t uses
  28.      the print conversion rules to process the files into the form requested
  29.      or a form printable by the target printer.
  30.  
  31.      _p_r_i_n_t_e_r is the name of a printer to which the output may be sent.
  32.  
  33.      _d_e_s_t_i_n_a_t_i_o_n-_t_y_p_e is the name of a destination filetype to which the
  34.      output should be converted.
  35.  
  36.      _s_o_u_r_c_e-_t_y_p_e is a file-type name.
  37.  
  38.      _f_i_l_e_s is one or more file names, separated by spaces.
  39.  
  40.      ----gggg      The ----gggg option should be used when _r_o_u_t_e_p_r_i_n_t is defined as part
  41.              of a file typing rule.  This option puts error messages in a
  42.              notifier window (instead of sending them to stdout) and
  43.              suppresses warnings.
  44.  
  45.      ----cccc      _f_i_l_e_t_y_p_e_D_a_t_a_b_a_s_e_P_a_t_h The ----cccc option allows users to specify an
  46.              alternate file typing rules database, ._o_t_r file to use.  This
  47.              option should be used to override the default FTR database search
  48.              path, which is /usr/lib/filetype/desktop.otr. In older versions,
  49.              _r_o_u_t_e_p_r_i_n_t used to also search in the user's HOME directory,
  50.              before looking under, /usr/lib/filetype directory. This is not
  51.              supported anymore, but the users can still give their own FTR
  52.              database using the ----cccc flag.  Also, note that the old FTR database
  53.              file format, ._c_t_r, is not supported anymore, it is replaced by
  54.              the new ._o_t_r file format.  By default, if an invalid database is
  55.              given, _r_o_u_t_e_p_r_i_n_t automatically rejects that database, and loads
  56.              the default _d_e_s_k_t_o_p._o_t_r database.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))                   PPPPrrrriiiinnnnttttiiiinnnngggg TTTToooooooollllssss                   RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))
  71.  
  72.  
  73.  
  74.      ----dddd      _d_e_s_t_i_n_a_t_i_o_n-_t_y_p_e is specified as the target filetype for the
  75.              conversion. _R_o_u_t_e_p_r_i_n_t will determine whether a conversion path
  76.              exists between the input file's type and the specified
  77.              _d_e_s_t_i_n_a_t_i_o_n-_t_y_p_e. If no conversion path exists, _r_o_u_t_e_p_r_i_n_t will
  78.              return an exit code other than 0 and an empty string.  If a
  79.              conversion path exists, _r_o_u_t_e_p_r_i_n_t will return an exit code of 0
  80.              and a string representing the commands necessary to execute in
  81.              order to convert the file from the source type to the destination
  82.              type.  This string may in turn be executed as a Bourne Shell
  83.              program or as the argument to _s_y_s_t_e_m to produce the destination
  84.              filetype on _s_t_d_o_u_t.
  85.  
  86.      The ----pppp and ----dddd options are mutually exclusive, and the ----dddd option may
  87.      appear only once on the command line.  The ----pppp or ----tttt options may appear
  88.      multiple times on the command line, and are used in the following way:
  89.  
  90.      ----pppp      _p_r_i_n_t_e_r is added to the collection of printers on which the
  91.              output may appear.  Each instance of the ----pppp option on the command
  92.              line adds one printer to this collection.  If more than one
  93.              printer is specified, _r_o_u_t_e_p_r_i_n_t uses the print conversion rules
  94.              to determine the best printer to use.  If no printer names are
  95.              given via the ----pppp flag, the destination printer is the system
  96.              default printer.  Using the ----pppp option overrules the system
  97.              default printer.
  98.  
  99.      ----tttt      _s_o_u_r_c_e-_t_y_p_e sets the filetype for the files that follow it on the
  100.              command line until another type is specified.  If no type is
  101.              given via the ----tttt flag, or files appear on the command line before
  102.              the first ----tttt, the files are typed by _r_o_u_t_e_p_r_i_n_t. _r_o_u_t_e_p_r_i_n_t
  103.              examines all of the specified files' types.  If they are
  104.              identical, a single print job will be initiated.  If the types
  105.              are varied, _r_o_u_t_e_p_r_i_n_t generates an error message.
  106.  
  107.      The system default printer is the printer or printer class on which a
  108.      print job appears if no printer is specified with the ----pppp option. The
  109.      system default printer is normally specified using the _P_r_i_n_t_e_r _M_a_n_a_g_e_r in
  110.      the _S_y_s_t_e_m menu on the _t_o_o_l_c_h_e_s_t(_1).
  111.  
  112. UUUUSSSSAAAAGGGGEEEE
  113.      A typical call from the command line might look like the following:
  114.  
  115.           routeprint -p myprinter file1 file2 file3
  116.  
  117.  
  118.      A typical call requesting a file conversion command line might look like
  119.      the following:
  120.  
  121.           routeprint -d PostScriptFile file1
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))                   PPPPrrrriiiinnnnttttiiiinnnngggg TTTToooooooollllssss                   RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))
  137.  
  138.  
  139.  
  140. JJJJOOOOBBBB OOOORRRRDDDDEEEERRRRIIIINNNNGGGG
  141.      The ordering of files specified on _r_o_u_t_e_p_r_i_n_t's command line determines
  142.      the ordering of files within the resultant print job.
  143.  
  144. PPPPRRRRIIIINNNNTTTT CCCCOOOONNNNVVVVEEEERRRRSSSSIIIIOOOONNNN RRRRUUUULLLLEEEESSSS
  145.      The ._f_t_r file used by _r_o_u_t_e_p_r_i_n_t contains both file type rules and print
  146.      conversion rules.
  147.  
  148.      The following is a typical set of print conversion rules:
  149.  
  150.           CONVERT TroffFile PostScriptFile
  151.               COST 50
  152.               FILTER psroff -t $file
  153.  
  154.           CONVERT PostScriptFile myLaserPrinterType
  155.               COST 50
  156.               FILTER lp -d $CURRENTPRINTER
  157.  
  158.  
  159.      The CONVERT item specifies the file type of the input file followed by
  160.      the file type of the converted file.
  161.  
  162.      The COST item specifies an arbitrary number between 0 and 1000
  163.      (inclusive) that represents the image degradation and processing cost
  164.      inherent in the conversion.  The higher the COST value, the more
  165.      _r_o_u_t_e_p_r_i_n_t will try to avoid printing by that specific conversion method,
  166.      if it is given a choice.
  167.  
  168.      The conventions for determining what COST to assign a given conversion
  169.      are as follows:
  170.  
  171.           COST REASON
  172.           0    Equivalent filetypes, or a SETVAR rule.
  173.           50   Default conversion cost.
  174.           125  Trivial data loss, or conversion is expensive.
  175.           200  Minor data loss AND conversion is not expensive.
  176.           300  Noticeable data loss AND conversion is expensive.
  177.           500  Obvious data loss.  (E.g., Color to Monochrome.)
  178.  
  179.  
  180.      The FILTER item contains the shell command that performs the conversion.
  181.  
  182.      Given the conversion rules above, the command:
  183.  
  184.             routeprint -p myLaserPrinterType -t TroffFile myfile.troff
  185.  
  186.      would cause the file mytroff.t to be printed on the printer named
  187.      ``mylaserprinter'' via the _p_s_r_o_f_f and _l_p commands.  Note that more than
  188.      one conversion rule may be used to actually get the files into a
  189.      printable form.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))                   PPPPrrrriiiinnnnttttiiiinnnngggg TTTToooooooollllssss                   RRRROOOOUUUUTTTTEEEEPPPPRRRRIIIINNNNTTTT((((1111))))
  203.  
  204.  
  205.  
  206. FFFFIIIILLLLEEEESSSS
  207.      /usr/lib/filetype/local/*.ftr
  208.      /usr/lib/filetype/install/*.ftr
  209.      /usr/lib/filetype/system/*.ftr
  210.      /usr/lib/filetype/default/*.ftr
  211.      /usr/lib/filetype/desktop.otr
  212.  
  213. KKKKNNNNOOOOWWWWNNNN BBBBUUUUGGGGSSSS
  214.      The maximum length of strings returned are currently harcoded.  The
  215.      command string returned by _r_o_u_t_e_p_r_i_n_t cannot exceed 4096 characters,
  216.      including terminating NULL, or routeprint's behavior will be undefined.
  217.  
  218.      _r_o_u_t_e_p_r_i_n_t does not currently support the use of multiple filetypes.
  219.  
  220. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  221.      _I_R_I_X _I_n_t_e_r_a_c_t_i_v_e _D_e_s_k_t_o_p _I_n_t_e_g_r_a_t_i_o_n _G_u_i_d_e , _r_o_u_t_e_p_r_i_n_t(_1), _f_t_r(_1), _s_h(_1)
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.